/*
 * @Author       : Sayolit
 * @Date         : 2023-01-08 12:15:43
 * @LastEditors  : Sayolit
 * @LastEditTime : 2023-01-10 11:36:41
 * @FilePath     : main.js
 * @Description  :
 * Copyright 2023 Sayolit, All Rights Reserved.
 * 2023-01-08 12:15:43
 */
import { createApp } from 'vue'
import App from './App.vue'
import axios from 'axios'
import * as echarts from 'echarts'

const app = createApp(App)

// 路由
import router from './router/index.js'

// 完全导入elementplus
// import ElementPlus from 'element-plus' 改用按需引入ElementPlus
// import 'element-plus/dist/index.css' 改用按需引入ElementPlus

//store
import store from './store'

//导入工具类中的storage
import storage from './utils/storage'

// animate.css
import 'animate.css'

//为app实例设置一个自定义的全局属性storage
app.config.globalProperties.$storage = storage

//mock.js
import '../mock/mock.js' //提前创建好的mock文件
app.config.globalProperties.$axios = axios

//echarts
app.config.globalProperties.$echarts = echarts

//postcss-pxtorem 自动转化为rem
import 'postcss-pxtorem'

// 引入View UI PLUS css样式
import 'view-ui-plus/dist/styles/viewuiplus.css'

app.use(router)
app.use(store)
// app.use(ElementPlus)  改用按需引入ElementPlus
app.mount('#app')
